﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    
    <script type="text/javascript">
        function pageLoad()
        {
            var img=$get("Image1");
            img.style.visibility="hidden";
            PageMethods.GetSlides(OnSuccess,OnError,OnTimeOut);
        }
        
        function OnSuccess(result)
        {
            slideshow.set_Slides(result);
            slideshow.set_Delay(2000);
            slideshow.Play();
        }
        
        function OnError(result)
        {
            alert(result.get_message());
        }
        
        function OnTimeOut(result)
        {
            alert(result);
        }
    </script>
    
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="True" >
            <Scripts>
                <asp:ScriptReference Path="~/jscript.js" />
            </Scripts>
        </asp:ScriptManager>
        <div>
            <br />
            <table>
                <tr>
                    <td align="center">
                        <img id="Image1" src="" width="268px" height="216px"/></td>
                </tr>
                <tr>
                    <td align="center">
                        <input id="Button1" style="width: 25px" type="button" value="<<" onclick="slideshow.ShowFirst()" />
                        <input id="Button2" style="width: 25px" type="button" value="<" onclick="slideshow.ShowPrevious()" />
                        <input id="Button5" style="width: 25px" type="button" value="||" onclick="slideshow.Pause()"/>
                        <input id="Button6" style="width: 25px; font-family: 'Wingdings 3'; height: 24px;" type="button" value="" onclick="slideshow.Play()"/>&nbsp;
                        <input id="Button3" style="width: 25px" type="button" value=">" onclick="slideshow.ShowNext()" />
                        <input id="Button4" style="width: 25px" type="button" value=">>" onclick="slideshow.ShowLast()"/>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
